﻿@using VirtoCommerce.Platform.Web
<!DOCTYPE html>
<html lang="en" ng-app="platformWebApp" ng-strict-di>
<head>
    <meta charset="utf-8" />
    <title>Virto Commerce @ViewBag.Title</title>
    <!-- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> -->
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />

    @{var google_tag_container_id = System.Configuration.ConfigurationManager.AppSettings["GoogleTagManager:ContainerId"];}
    @if(google_tag_container_id != null)
    {
    <!-- Google Tag Manager -->
    <script>
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window, document, 'script', 'dataLayer', '@google_tag_container_id');
    </script>
    <!-- End Google Tag Manager -->
    }
    @Styles.Render(Startup.VirtualRoot + "/css/core")
    @Styles.Render(Startup.VirtualRoot + "/css/modules")
    @*<script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/3.4.0/es5-shim.min.js"></script>*@

    <meta name="viewport" content="width=device-width" />
    <base href="~/" />
	@Html.Partial("_FacebookTrackerPartial")
    @Html.Partial("_AppInsightsPartial")
</head>
<body ng-class="{'has-demo-warning' : demoResetTime, 'lang-rtl': isRTL}" ng-controller="platformWebApp.appCtrl" ng-init="platformVersion ='@(Model.PlatformVersion)'; demoCredentials = @(Model.DemoCredentials); demoResetTime = @(Model.DemoResetTime);">
    @if(google_tag_container_id != null)
    {
     <!-- Google Tag Manager (noscript) -->
        <noscript>
            <iframe src="@("https://www.googletagmanager.com/ns.html?id=" + google_tag_container_id)"
                    height="0" width="0" style="display:none;visibility:hidden"></iframe>
        </noscript>
    <!-- End Google Tag Manager (noscript) -->
    }
    @RenderBody()

    @Scripts.Render(Startup.VirtualRoot + "/scripts/angular")
    @Scripts.Render(Startup.VirtualRoot + "/scripts/modules")
    @RenderSection("scripts", required: false)
</body>
</html>